package a.f.g;

import a.a.kb;
import a.c.*;
import a.c.d;
import a.c.e;
import a.c.m;
import a.d.s;
import a.f.n.c;
import a.f.o;
import a.i.y;

import java.awt.*;

class h
{
  o a;
  x b;
  ab[] c;
  bb[] d;
  y e;
  boolean f = false;
  
  h(o paramo)
  {
    this.a = paramo;
  }
  
  void a()
  {
    boolean bool = j.c;
    int j = j.b;
    this.b = this.a.B();
    this.e = new y(this.a);
    this.d = kb.b(this.a);
    this.c = kb.a(this.a, this.d);
    c localc = new c();
    if (!bool)
    {
      if (this.d.length != 1) {
        break label125;
      }
      if (bool) {}
    }
    else
    {
      if (this.d[0].size() != this.a.k()) {
        break label125;
      }
      localc.c(360);
    }
    if (!bool)
    {
      if (j != 0) {
        label125:
        localc.c(360);
      }
      this.e.b();
    }
    int i = 0;
    Object localObject1;
    Object localObject2;
    Object localObject3;
    do
    {
      if (i >= this.c.length) {
        break;
      }
      localObject1 = this.c[i];
      a(((ab)localObject1).l());
      localc.a(this.a);
      localObject2 = this.d[i].m();
      localObject3 = this.a.u((e)localObject2);
      Rectangle localRectangle = this.a.d();
      this.a.b((e)localObject2, localRectangle.width, localRectangle.height);
      localRectangle.setSize((int)((s)localObject3).b(), (int)((s)localObject3).c());
      if (bool) {
        break label329;
      }
      if (j != 0) {
        break label323;
      }
      this.b.a(localObject2, localRectangle);
      if (!this.a.n()) {
        this.a.d(this.a.p());
      }
      for (;;)
      {
        if (!bool) {
          if (j == 0)
          {
            if (j == 0) {
              break;
            }
            if (bool) {
              continue;
            }
            i++;
          }
        }
      }
    } while (j == 0);
    if (!bool) {
      label323:
      this.e.g();
    }
    label329:
    i = 0;
    label438:
    label440:
    do
    {
      if (i >= this.d.length) {
        break;
      }
      localObject1 = this.d[i];
      localObject2 = ((bb)localObject1).l();
      if ((bool) || (((a.c.w)localObject2).e()))
      {
        localObject3 = ((a.c.w)localObject2).d();
        ((a.c.w)localObject2).f();
        do
        {
          if (!((a.c.w)localObject2).e()) {
            break;
          }
          this.e.a(((a.c.w)localObject2).d());
          ((a.c.w)localObject2).f();
          if (bool) {
            break label440;
          }
          if (j != 0) {
            break label438;
          }
        } while (j == 0);
      }
      if (!bool) {
        i++;
      }
    } while (j == 0);
  }
  
  void c()
  {
    boolean bool = j.c;
    int k = j.b;
    this.e.g();
    int[] arrayOfInt = new int[this.a.k()];
    int i = 0;
    bb localbb;
    Object localObject1;
    Object localObject2;
    label115:
    label117:
    do
    {
      do
      {
        if (i >= this.d.length) {
          break;
        }
        localbb = this.d[i];
        if (k != 0) {
          break label144;
        }
        localObject1 = localbb.l();
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.w)localObject1).d();
          arrayOfInt[localObject2.f()] = (i + 1);
          ((a.c.w)localObject1).f();
          if (bool) {
            break label117;
          }
          if (k != 0) {
            break label115;
          }
        } while (k == 0);
        if (!bool) {
          i++;
        }
      } while (k == 0);
    } while (bool);
    i = 0;
    if (i < this.d.length) {}
    label144:
    label445:
    label584:
    label586:
    do
    {
      localbb = this.d[i];
      localObject1 = localbb.m();
      localObject2 = this.a.o((e)localObject1);
      Rectangle localRectangle = (Rectangle)this.b.get(localObject1);
      s locals = this.a.u((e)localObject1);
      double d1 = ((a.d.w)localObject2).a() - locals.b() / 2.0D;
      double d2 = ((a.d.w)localObject2).b() - locals.c() / 2.0D;
      double d3 = localRectangle.x;
      double d4 = localRectangle.y;
      double d5 = d1 - d3;
      double d6 = d2 - d4;
      this.a.b((e)localObject1, localRectangle.width, localRectangle.height);
      this.a.a((e)localObject1, 0.0D, 0.0D);
      int j = arrayOfInt[localObject1.f()];
      double d7 = 0.0D;
      double d8 = 0.0D;
      if (k != 0) {
        return;
      }
      Object localObject3 = ((e)localObject1).l();
      Object localObject4;
      double d9;
      do
      {
        do
        {
          if (!((m)localObject3).e()) {
            break label445;
          }
          localObject4 = ((m)localObject3).a();
          e locale = ((d)localObject4).a((e)localObject1);
          if (k != 0) {
            break;
          }
          if (arrayOfInt[locale.f()] != j)
          {
            double d10 = ((a.d.w)localObject2).a() - this.a.m(locale);
            double d11 = ((a.d.w)localObject2).b() - this.a.n(locale);
            d9 = Math.sqrt(d10 * d10 + d11 * d11);
            d10 /= d9;
            d11 /= d9;
            d7 += d10;
            d8 += d11;
          }
          ((m)localObject3).f();
        } while (k == 0);
      } while (bool);
      if ((bool) || ((d7 != 0.0D) && ((bool) || (d8 != 0.0D))))
      {
        d9 = Math.sqrt(d7 * d7 + d8 * d8);
        d7 /= d9;
        d8 /= d9;
        a(localbb.l(), d7, d8);
      }
      localObject3 = localbb.l();
      do
      {
        if (!((a.c.w)localObject3).e()) {
          break;
        }
        localObject4 = ((a.c.w)localObject3).d();
        this.a.d((e)localObject4, d5, d6);
        ((a.c.w)localObject3).f();
        if (bool) {
          break label586;
        }
        if (k != 0) {
          break label584;
        }
      } while (k == 0);
      if (!bool) {
        i++;
      }
      if (k == 0) {
        break;
      }
      this.a.a(this.b);
      this.c = null;
      this.d = null;
    } while (bool);
    this.e = null;
  }
  
  void a(a.c.w paramw, double paramDouble1, double paramDouble2)
  {
    int i = j.b;
    paramw.h();
    do
    {
      if (!paramw.e()) {
        break;
      }
      e locale = paramw.d();
      double d1 = this.a.m(locale);
      double d2 = this.a.n(locale);
      this.a.a(paramw.d(), d1 * paramDouble1 - paramDouble2 * d2, d1 * paramDouble2 + paramDouble1 * d2);
      paramw.f();
    } while (i == 0);
  }
  
  void a(m paramm)
  {
    boolean bool = j.c;
    int i = j.b;
    paramm.h();
    do
    {
      if (!paramm.e()) {
        break;
      }
      d locald = paramm.a();
      if (!bool) {
        if (!this.a.h(locald.e())) {
          this.a.e(locald.e());
        }
      }
      if (!bool) {
        if (!this.a.h(locald.f())) {
          this.a.e(locald.f());
        }
      }
      if (!bool)
      {
        if (!this.a.j(locald)) {
          this.a.g(locald);
        }
        paramm.f();
      }
    } while (i == 0);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.g.h

 * JD-Core Version:    0.7.0.1

 */